-
Notifications
You must be signed in to change notification settings - Fork 217
Remove FetchFailed conditions from OCI #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e9ff156 to
10f70d6
Compare
|
I was testing this, it leads us into more complicated conditions related issue. For example, we usually have extra conditions that have higher priority than Reconciling and Stalled conditions. But now, Reconciling and Stalled conditions have the highest priority. Due to this, an actual failure value (reason + message) set in Ready condition directly during reconciliation is overwritten by the condition summarizer with the value of Reconciling. When a referred secret is not found, instead of the Ready condition showing the error that the secret wasn't found, it shows the Reconciling message about reconciling new generation. status:
conditions:
- lastTransitionTime: "2022-05-26T11:45:04Z"
message: reconciling new object generation (2)
observedGeneration: 2
reason: NewGeneration
status: "True"
type: Reconciling
- lastTransitionTime: "2022-05-26T11:45:04Z"
message: reconciling new object generation (2)
observedGeneration: 2
reason: NewGeneration
status: "False"
type: Ready
observedGeneration: 1The events and logs show the right reason Log: Usually we set things like login failure in a separate condition which has higher priority than Reconciling and Stalled conditions, so they still exist on the status, but don't overwrite the Ready condition, which is overwritten by another condition that contains the actual reason for the failure, like a FetchFailed condition we used to have. Setting both Ready and Reconciling condition with the same value doesn't seem to be right. Reconciling condition shows the reason for why a reconciliation is taking place and not why something failed. Failures should have their own conditions. This makes me conclude that it'd be better to keep a negative condition like FetchFailed, but rename it to something appropriate as this reconciler no longer fetches anything. Maybe This will solve the problem of Reconciling overwriting Ready condition. I don't think we need a positive polarity condition yet, just setting the Ready condition directly should be fine. The above issue arise only because of the negative polarity conditions. |
f14ffe9 to
67cbd8a
Compare
If implemented the Helmrepository_oci reconciler will have a new negative polarity condition addFailedCondition. Signed-off-by: Soule BA <[email protected]>
67cbd8a to
fa919c1
Compare
|
Superseded by #748 |
Signed-off-by: Soule BA [email protected]
If implemented the Helmrepository_oci reconciler will have a new
negative polarity condition addFailedCondition.
This implementation is also adding a deletion of all conditions when switching type. Previously not doing so was resulting in negative polarity condition set in previous generation to be taken into account when inferring the ready condition at the end of the reconciliation, resulting in a wrong reconciliation state.
tests
We have tested the following in a live cluster
type: "oci"fromoci://ghcr.io/souleb/chartstohttps://ghcr.io/souleb/charts=> resulted inAddFailed = True,Ready= Falsetype: "oci"fromhttps://ghcr.io/souleb/chartstooci://ghcr.io/souleb/charts=> resulted inReady = Truetype: "oci"=> resulted inReconciling= True,Ready= False,FetchFailed= Truetype: "oci"=> resulted inReady= TrueHere some of the test results
Wrong URL Scheme
missing secret